package cn.zjutleo.village_server.mapper;

import cn.zjutleo.village_server.entity.HouseRent;
import cn.zjutleo.village_server.vo.HouseRentDetailVo;
import cn.zjutleo.village_server.vo.HouseRentRoughVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface HouseRentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(HouseRent record);

    int insertSelective(HouseRent record);

    HouseRent selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(HouseRent record);

    int updateByPrimaryKey(HouseRent record);

    HouseRentDetailVo selectDetailVoByPrimaryKey(Integer id);

    List<HouseRentDetailVo> selectDetailVos();

    List<HouseRentDetailVo> selectDetailVosByPrice(@Param("minPrice") Integer minPrice, @Param("maxPrice") Integer maxPrice);

    List<HouseRentDetailVo> selectDetailVosByIntro(String query);

    List<HouseRentDetailVo> selectDetailVosByConditions(@Param("minPrice") Integer minPrice,
                                                        @Param("maxPrice") Integer maxPrice,
                                                        @Param("query") String query,
                                                        @Param("check") Integer check);

    List<HouseRentRoughVo> selectRoughVosByConditions(@Param("villageId") Integer villageId,
                                                      @Param("type") Integer type,
                                                      @Param("minPrice") Integer minPrice,
                                                      @Param("maxPrice") Integer maxPrice,
                                                      @Param("closest") Integer closest);

}
